/*=====================================================
Critical Links
Auto Configuration Server

Authors:
	Rui Eduardo Gouveia Gil - r-gil@critical-links.com

Date: 2010
Version 0.1
=======================================================*/
#ifndef __LOG_H__
#define __LOG_H__

#include <vector>
#include <string>
#include <iostream>
#include <rgcpp/tools/ToString.h>

namespace acs
{

enum LogLevel
{
	ACS_LL_DEBUG,
	ACS_LL_NOTICE,
	ACS_LL_WARNING,
	ACS_LL_ERROR
};

class Log
{
	private:
		int id;
		time_t date;
		int deviceID;
		LogLevel level;
		std::string ip;
		std::string name;
		std::string license;
		std::string release;
		std::string command;
		std::string customer;

		std::string result;
		std::string message;

	public:
		Log();
		Log(LogLevel level, int deviceID, std::string ip, std::string name, std::string license, std::string release, std::string customer, std::string command, std::string result, std::string message);
		~Log();

		void setID(const int id);
		int getID() const;

		void setDate(const time_t date);
		time_t getDate() const;

		void setDeviceID(const int deviceID);
		int getDeviceID() const;

		void setLevel(const LogLevel level);
		LogLevel getLevel() const;
		std::string getLevelStr() const;
		std::string getLevelIcon() const;

		void setIp(const std::string& ip);
		std::string getIp() const;

		void setName(const std::string& name);
		std::string getName() const;

		void setLicense(const std::string& license);
		std::string getLicense() const;

		void setRelease(const std::string& release);
		std::string getRelease() const;

		void setCustomer(const std::string& customer);
		std::string getCustomer() const;

		void setCommand(const std::string& command);
		std::string getCommand() const;

		void setResult(const std::string& result);
		std::string getResult() const;

		void setMessage(const std::string& message);
		std::string getMessage() const;

		std::string toXML() const;
};

}

#endif
